package com.googlecode.connectlet.crypto.cipher.mode.provider;

import com.googlecode.connectlet.crypto.cipher.CipherFactory;
import com.googlecode.connectlet.crypto.cipher.mode.EcbPkcs5PaddingDecipheror;
import com.googlecode.connectlet.crypto.cipher.mode.EcbPkcs5PaddingEncipheror;

public class EcbPkcs5PaddingCipherSpi extends EcbNoPaddingCipherSpi {
	public EcbPkcs5PaddingCipherSpi(CipherFactory cipherFactory) {
		super(cipherFactory);
	}

	@Override
	protected EcbPkcs5PaddingEncipheror getEncCipher(CipherFactory factory, byte[] key) {
		return new EcbPkcs5PaddingEncipheror(factory.getEncipheror(key));
	}

	@Override
	protected EcbPkcs5PaddingDecipheror getDecCipher(CipherFactory factory, byte[] key) {
		return new EcbPkcs5PaddingDecipheror(factory.getDecipheror(key));
	}
}